package kr.test.t;

public class Complex {
	private double real;
	private double imag;
	
	public Complex(double r, double i){
		real = r;
		imag = i;
	}

	public double getReal() {
		return real;
	}

	public void setReal(double real) {
		this.real = real;
	}

	public double getImag() {
		return imag;
	}

	public void setImag(double imag) {
		this.imag = imag;
	}

	public Complex add(Complex c){
		double resultReal = real + c.getReal();
		double resultImag = real + c.getImag();
		return new Complex(resultReal, resultImag);
	}
}
